package com.itheima.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aopalliance.intercept.Joinpoint;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

//演示AOP中的切入点表达式
//@Aspect
@Component
@Slf4j
@Order(10)
public class AspectDemo3 {

    //前置通知
    @Before("execution(public * com.itheima.service.*.*(..)) || execution(public * com.itheima.controller.*.get*(..))")
    public void m2(JoinPoint jp) {
        log.info("前置通知:{}", jp.getSignature());
    }
}
